fontrendering demo: Stop using radio buttons
authorMatthias Clasen <mclasen@redhat.com>
Mon, 31 Aug 2020 01:50:45 +0000 (21:50 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 31 Aug 2020 02:14:05 +0000 (22:14 -0400)
Replace them with grouped toggled buttons.

demos/gtk-demo/fontrendering.c
demos/gtk-demo/fontrendering.ui

index cc1d9033bb3d57158cd39cf426237f124f295118..fc6fb1b1ee94f3fb78eefa927c2917ad93e1c187 100644 (file)
@@ -69,7 +69,7 @@ update_image (void)
   cairo_font_options_destroy (fopt);
   pango_context_changed (context);
 
-  if (gtk_check_button_get_active (GTK_CHECK_BUTTON (text_radio)))
+  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (text_radio)))
     {
       layout = pango_layout_new (context);
       pango_layout_set_font_description (layout, desc);
index b3606c53995e04e1506a2c5ffd1638564b9963dc..363f6f5e3df4c6266e4f269739afe38170a495a7 100644 (file)
               <class name="linked"/>
             </style>
             <child>
-              <object class="GtkRadioButton" id="text_radio">
+              <object class="GtkToggleButton" id="text_radio">
                 <property name="label">Text</property>
+                <property name="active">1</property>
               </object>
             </child>
             <child>
-              <object class="GtkRadioButton" id="grid_radio">
+              <object class="GtkToggleButton" id="grid_radio">
                 <property name="label">Grid</property>
                 <property name="group">text_radio</property>
               </object>